package com.telecom.cms.service;

import java.util.List;
import com.telecom.cms.dao.CampContRsltDAO;
import com.telecom.cms.dto.CampContRslt;

public class CampContRsltMgr {
   
	public void save(CampContRslt campcontrslt){
		(new CampContRsltDAO()).insert(campcontrslt);
	}
	
	public void savetoinf(CampContRslt campcontrslt,String userid){
		//CampContRsltDAO dao=new CampContRsltDAO();
		(new CampContRsltDAO()).insert(campcontrslt);
		//if(campcontrslt.getCampContRsltLvlId()>500&&campcontrslt.getCampContRsltLvlId()<599)
			//success
		//	(new CampContRsltDAO()).inserttrace(campcontrslt,userid);
		if(502==campcontrslt.getCampContRsltLvlId()) //come to house
			(new CampContRsltDAO()).insertinf(campcontrslt,userid);
	}
	
	/*public void  delete(CampContRslt campcontrslt){
		(new CampContRsltDAO()).delete(campcontrslt);
	}*/
	
	public List findall(String campid,String campseqid,String custid,String prdinstid,String userid){
		List result=(new CampContRsltDAO()).findAll(campid,campseqid,custid,prdinstid,userid);
		return result;
	}
	
	public CampContRslt findById(String campid,String campseqid,String custid,String prdinstid,String contseqid) 
	{
		return (new CampContRsltDAO()).findById(campid,campseqid,custid,prdinstid,contseqid); 
	}
	
	public List findCampProm(String campid){
		List result=(new CampContRsltDAO()).findCampProm(campid);
		return result;
	}
	
}
